#include "State.h"
#include "Config.h"

#ifndef MOVEMENT
#define MOVEMENT

void moveRight()
{
	State::position.x += (GLfloat)Math::cos(State::radianY) * State::deltaV;
	State::position.z += (GLfloat)Math::sin(State::radianY) * State::deltaV;
}
void moveBack()
{
	State::position.x -= (GLfloat)cos(State::radianY) * State::deltaV;
	State::position.z -= (GLfloat)sin(State::radianY) * State::deltaV;
}
void moveForward()
{		
	State::position.x += (GLfloat)sin(State::radianY) * State::deltaV;
	State::position.z -= (GLfloat)cos(State::radianY) * State::deltaV;
}
void moveLeft()
{
	State::position.x -= (GLfloat)sin(State::radianY) * State::deltaV;
	State::position.z += (GLfloat)cos(State::radianY) * State::deltaV;
}
void moveUp()
{
	State::position.y += State::deltaV;
}
void moveDown()
{
	State::position.y -= State::deltaV;
}

void mouseLook(int x, int y)
{
	State::rotation.y += (GLfloat)(x * Config::sensitivity);
	State::rotation.x += (GLfloat)(y * Config::sensitivity);
}

#endif